import java.sql.{DriverManager, ResultSet}

import cn.tecnova.utils.ConfigHandler

/**
  * description:
  * Rabcheng
  * Date:2019/3/25 12:58
  **/
object TestMysql {

  def main(args: Array[String]): Unit = {

    val conn = DriverManager.getConnection(ConfigHandler.url,ConfigHandler.user,ConfigHandler.passwd)
    val statement = conn.prepareStatement("select id,name from category")

    val set: ResultSet = statement.executeQuery()

    while (set.next()){
      println(set.getString("id"))
      println(set.getString("name"))
    }








  }

}
